﻿@model  NCP.Recruiting.WebApp.Models.Departments.DepartmentListModel
@using NCP.Recruiting.WebApp.Extensions
@{
    ViewBag.Title = "浏览部门";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<script type="text/javascript">
    $(document).ready(function () {

    });
</script>
<div id="wrap">
    <div class="wrapContents">
        <h1>
            @ViewBag.Title</h1>
        <div class="search">
            <div class="search_left">
                <div class="caozuo">
                    @Html.ActionLink("创建", "Add", null, new { @class = "built" })<a href="#" class="delateAll">删除所有</a></div>
            </div>
            <div class="search_right">
            </div>
            <div class="cr">
            </div>
        </div>
        <table cellpadding="0" cellspacing="0" width="100%">
            <thead>
                <tr>
                    <th>
                        <input type="checkbox" />
                    </th>
                    <th>
                        部门名称
                    </th>
                    <th>
                        联系人
                    </th>
                    <th>
                        电子邮件
                    </th>
                    <th>
                        联系电话
                    </th>
                    <th>
                        传真
                    </th>
                    <th>
                        移动电话
                    </th>
                    <th>
                        操作
                    </th>
                </tr>
            </thead>
            <tbody>
                @foreach (var item in Model.Departments) {
                    <tr>
                        <td>
                            <input type="checkbox" />
                        </td>
                        <td align="left">
                            <b style="color: #12799a">@item.DepartmentName</b>
                        </td>
                        <td align="left">@item.Contact
                        </td>
                        <td align="left">@item.Email
                        </td>
                        <td>@item.Tel
                        </td>
                        <td>@item.Fax
                        </td>
                        <td align="left">@item.Mobile
                        </td>
                        <td style="text-align: center;">
                            @using (Html.BeginForm("Delete", "Department", FormMethod.Post)) {
                                @Html.Hidden("id", item.Id)
                                @Html.ActionLink("编辑", "Edit", new { id = item.Id })  @:|
                                <input type="submit" value="删除" style="background: #ffffff; color: #12799A; border: 0px;
                                    text-decoration: none; cursor: pointer; filter: chroma(color=#ffffff);" onclick="return confirm('确定要删除该部门？');" />                         

                            }
                        </td>
                    </tr>
       
                }
            </tbody>
        </table>
        <div class="pagelists">
            @Html.Pager(Model.PagingFilteringContext).QueryParam("pagenumber")
        </div>
    </div>
</div>
